'use strict';
//事件驱动器
define(['app','note'],function(app,EventDispatcher){
    (function () {

        var NotificationsProvider = Class.extend({

            instance: new EventDispatcher(),

            $get: [function () {
                //.notify()调用this.instance.dispatchEvent;
                this.instance.notify = this.instance.dispatchEvent;
                return this.instance;
            }]
        });

        app.provider('Notifications', NotificationsProvider);
    }());
});